package com.robotserver.orders.param.biz;

/**
 * @Auther: jianghan
 * @Date: 2019/11/14 09:44
 * @Description:
 */
public class PageInfo {
    private int pageIndex;
    private int pageSize;
    private int index;

    private Long id;

    public int getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(int pageIndex) {
        this.pageIndex = pageIndex;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getIndex() {
        if (pageIndex==0){
            pageIndex = 1;
        }
        if (pageSize==0){
            pageSize=20;
        }
        return this.pageSize*(pageIndex-1);
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
}
